const RedisBase = require('../common/RedisBase');
const redis = require('../common/Redis');
const game_config = require('../config/game_config');
const log = require('../utils/log');
const resCode = require("../config/ResCode");
const Redis = require("../common/Redis");


class loginRedis {
    static getInstance(){
        if(!loginRedis.instance){
            loginRedis.instance = new loginRedis();
            return loginRedis.instance;
        }else{
            return loginRedis.instance;
        }
    }

    constructor() {
        // super(game_config.center_redis.host,game_config.center_redis.port,game_config.center_redis.db_index);
        // log.info('=======loginRedis=constructor=========');

        // // let rds = new RedisBase()
        // this.connectRedis(game_config.center_redis.host,game_config.center_redis.port,game_config.center_redis.db_index);

        // this.redisCli = new Redis({
        //     host: game_config.center_redis.host,
        //     port: game_config.center_redis.port,
        //     // password: 'your_password', // 如果需要密码，请取消注释并设置密码
        //     db: game_config.center_redis.db_index,
        // })
    }

}

global.loginSerMgr.loginRedis = loginRedis.getInstance();
// log.error('=======global.loginSerMgr.loginRedis===========',global.loginSerMgr.loginRedis);
module.exports = loginRedis;